package aliyun

var Aliyun = &aliyun{
	Oss: &aliyunOss{},
	Sls: &aliyunSls{},
	Ecs: &aliyunEcs{},
}

type aliyun struct {
	Oss *aliyunOss
	Sls *aliyunSls
	Ecs *aliyunEcs
}

type aliyunConfig struct {
	AccessId      string
	AccessKey     string
	SecurityToken string
	Region        string
}

const (
	aliyunSlsEndpoint = "%s.log.aliyuncs.com"
	aliyunSlsLink     = "https://sls.console.aliyun.com/lognext/project/%s/logsearch/%s?encode=base64&queryString=%s&queryTimeType=99&startTime=%d&endTime=%d"

	aliyunDingtalkUrl = "https://oapi.dingtalk.com/robot/send?access_token=%s"
)

type dingtalkResponse struct {
	ErrorCode    int    `json:"errcode"`
	ErrorMessage string `json:"errmsg"`
}
